package com.whately.core.base.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseError implements ErrorCode {

    private int code = 444;
    private String message= StringUtils.EMPTY;
    private boolean ignorePrintErrorDetailFlag;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getMessage(Object... params) {
        return String.format(this.message, params);
    }

    @Override
    public boolean isIgnorePrintErrorDetailFlag() {
        return ignorePrintErrorDetailFlag;
    }
}
